package org.gruposp2p.dnie.model.xmladapter;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.gruposp2p.dnie.model.DNIeDocumentToSign;

/**
 *
 * @author jj
 */
public class DNIeDocumentToSignAdapter extends XmlAdapter<Integer, DNIeDocumentToSign> {

    @Override
    public Integer marshal(DNIeDocumentToSign documentToSign) throws Exception {
        return documentToSign.getId();
    }

    @Override
    public DNIeDocumentToSign unmarshal(Integer documentToSignId) throws Exception {
        DNIeDocumentToSign documentToSign = new DNIeDocumentToSign();
        documentToSign.setId(documentToSignId);
        return documentToSign;
    }

}
